<script lang="ts" setup>
defineOptions({ name: 'CellStatus' })

const props = withDefaults(defineProps<Props>(), {
  status: 1,
  onText: '启用',
  offText: '禁用',
})

interface Props {
  status: number | boolean
  onText?: string
  offText?: string
}
</script>

<template>
  <span v-if="props.status">
    <icon-check-circle-fill class="success" />
    <span>{{ onText }}</span>
  </span>
  <span v-else>
    <icon-minus-circle-fill class="danger" />
    <span>{{ offText }}</span>
  </span>
</template>

<style lang="less" scoped></style>
